﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jzy.Core.Common;
using Jzy.BLL.SiteAdmin;
using Jzy.Model.SiteAdmin;
using Jzy.Core.Common.Web;

namespace Jzy.Web.WebSite
{
    public partial class JobList : System.Web.UI.Page
    {
        private PagerSortSetting _setting;
        protected void Page_Load(object sender, EventArgs e)
        {
            _setting = this.Pager1.InitPager(new BindViewHandler(BindView));
        
            if (!IsPostBack)
            {
                BindView();
            }
        }

        private void BindView()
        {
            JobBO job = new JobBO();

            List<JobInfo> list = job.GetList();

            rpt.DataSource = _setting.GetList(list); ;

            rpt.DataBind();


        }

        protected string GetDesc(object desc)
        {
            return desc.ToString().Replace("\r\n", "<br>").Replace(" ", "&nbsp;");
        }
    }
}
